﻿using Zpb;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UtilLib;

namespace client
{
    /// <summary>
    /// PageDebug.xaml 的交互逻辑
    /// </summary>
    public partial class PageDebug : Page
    {
        public PageDebug()
        {
            InitializeComponent();

            TextBoxDebug.Text = App.TxtDebug;

            App.PageDebug = this;
        }
        private void Button_Click_Debug1(object sender, RoutedEventArgs e)
        {
        }
        private void Button_Click_Debug2(object sender, RoutedEventArgs e)
        {
        }
        private void Button_Click_Debug3(object sender, RoutedEventArgs e)
        {
            
        }
        private void Button_Click_Debug4(object sender, RoutedEventArgs e)
        {
            
        }
        private void Button_Click_Debug5(object sender, RoutedEventArgs e)
        {
            
        }
        private void Button_Click_Test(object sender, RoutedEventArgs e)
        {
            var Content = (sender as Button).Content.ToString();
            switch (Content)
            {
                case "修改名字":
                    {
                        MsgString req = new();
                        req.Value = TextBoxTestArg1.Text;
                        App.Send(EPid.CgplayerChangeName, req);
                    }
                    break;
                case "修改头像":
                    {
                        MsgInt32 req = new();
                        req.Value = TextBoxTestArg1.Text.ToInt();
                        App.Send(EPid.CgplayerChangeHead, req);
                    }
                    break;
                case "修改标记":
                    {
                        MsgKvInt32Int32 req = new();
                        req.Key = TextBoxTestArg1.Text.ToInt();
                        req.Value = TextBoxTestArg2.Text.ToInt();
                        App.Send(EPid.CgplayerChangeFlagInt, req);
                    }
                    break;
                
                //case "公告列表":
                //    {
                //        ListNoticeReq req = new();
                //        req.Platform = "ios";
                //        req.Version = "1";
                //        App.Send(EPid.PlistNoticeReq, req);
                //    }
                //    break;
                //case "获取玩家信息":
                //    {
                //        PlayerShowReq req = new();
                //        App.Send(EPid.PplayerShowReq, req);
                //    }
                //    break;
                //case "出战位券扣除":
                //    {
                //        BagMinusBattlePosCardReq req = new();
                //        req.NeedCardCount = 1;
                //        App.Send(EPid.PbagMinusBattlePosCardReq, req);
                //    }
                //    break;
                default:
                    break;
            }
        }
    }
}
